import Cookies from 'js-cookie'

const TokenKey = 'hasLogin'

export function getToken() {
  return localStorage.getItem('hasLogin')
  // return Cookies.get(TokenKey)
}

export function setToken(token) {
  return localStorage.setItem('hasLogin', token)
  // return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return localStorage.removeItem('hasLogin')
  // return Cookies.remove(TokenKey)
}

export function getRole() {
  return localStorage.getItem('role')
  // return Cookies.get(TokenKey)
}

export function setRole(role) {
  return localStorage.setItem('role', role)
  // return Cookies.set(TokenKey, token)
}

export function removeRole() {
  return localStorage.removeItem('role')
  // return Cookies.remove(TokenKey)
}
